package com.hombio.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.hombio.UIBean.Putaway;
import com.hombio.service.MedicineMSService;

@Controller
public class MedicinePutawayController {

	@Autowired
	MedicineMSService medicineMSService;

	                   
	@RequestMapping("/mp/caseTraceCode")
	@ResponseBody
	public Putaway checkCaseTraceCode(String traceCode){
		return medicineMSService.checkCaseTraceCode(traceCode);
	}
	
	@RequestMapping("/mp/boxTraceCode")
	@ResponseBody
	public Putaway checkBoxTraceCode(String traceCode){
		return medicineMSService.checkBoxTraceCode(traceCode);
	}
	
	@RequestMapping("/mp/save/{employeeId}")
	@ResponseBody
	public void savePutawayRecord(@PathVariable Integer employeeId,@RequestBody Putaway[] records){
		medicineMSService.savePutawayRecord(employeeId, records);
	}
}
